import { createRouter, createWebHashHistory } from 'vue-router'

const router = createRouter({
  history: createWebHashHistory(), // hash模式：createWebHashHistory，history模式：createWebHistory
  routes: [
    {
      path: '/',
      redirect: '/index'
    },
    {
        path: '/index',
        name: 'index',
        component: () => import(/* webpackChunkName: "introduce" */ '../pages/index.vue')
      },
    {
      path: '/detail',
      name: 'detail',
      component: () => import(/* webpackChunkName: "introduce" */ '../pages/detail.vue')
    },
    {
        path: '/test',
        name: 'test',
        component: () => import(/* webpackChunkName: "introduce" */ '../pages/test.vue')
      },
  ]
})

export default router